-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add 2D multi-ion GLM-MHD equations for the TreeMesh solver #2196
Conversation
Review checklistThis checklist is meant to assist creators of PRs (to let them know what reviewers will typically look for) and reviewers (to guide them in a structured review process). Items do not need to be checked explicitly for a PR to be eligible for merging. Purpose and scope
Code quality
Documentation
Testing
Performance
Verification
Created with ❤️ by the Trixi.jl community. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2196 +/- ##
==========================================
+ Coverage 96.39% 96.43% +0.04%
==========================================
Files 483 485 +2
Lines 38349 38918 +569
==========================================
+ Hits 36964 37529 +565
- Misses 1385 1389 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
The old performance issues have been resolved. For comparison, the performance indices on a single core of an AMD Ryzen Threadripper 3990X for the test
These performance indices are comparable with the performance indices of the single-fluid MHD test ‘examples/tree_2d_dgsem/elixir_mhd_ec.jl‘:
Here is the summary at the end of the 2-ion simulation: ────────────────────────────────────────────────────────────────────────────────────
Trixi.jl Time Allocations
─────────────────────── ────────────────────────
Tot / % measured: 1.44s / 98.8% 34.5MiB / 98.0%
Section ncalls time %tot avg alloc %tot avg
────────────────────────────────────────────────────────────────────────────────────
rhs! 491 1.32s 92.8% 2.69ms 9.33KiB 0.0% 19.5B
volume integral 491 1.06s 74.6% 2.16ms 0.00B 0.0% 0.00B
interface flux 491 177ms 12.4% 360μs 0.00B 0.0% 0.00B
source terms 491 43.5ms 3.1% 88.6μs 0.00B 0.0% 0.00B
surface integral 491 17.5ms 1.2% 35.6μs 0.00B 0.0% 0.00B
prolong2interfaces 491 14.3ms 1.0% 29.1μs 0.00B 0.0% 0.00B
Jacobian 491 3.59ms 0.3% 7.31μs 0.00B 0.0% 0.00B
reset ∂u/∂t 491 2.89ms 0.2% 5.89μs 0.00B 0.0% 0.00B
~rhs!~ 491 538μs 0.0% 1.10μs 9.33KiB 0.0% 19.5B
prolong2boundaries 491 24.6μs 0.0% 50.0ns 0.00B 0.0% 0.00B
prolong2mortars 491 20.7μs 0.0% 42.2ns 0.00B 0.0% 0.00B
mortar flux 491 18.9μs 0.0% 38.5ns 0.00B 0.0% 0.00B
boundary flux 491 11.2μs 0.0% 22.7ns 0.00B 0.0% 0.00B
analyze solution 11 55.2ms 3.9% 5.02ms 27.0MiB 79.6% 2.45MiB
calculate dt 99 33.3ms 2.3% 336μs 0.00B 0.0% 0.00B
I/O 6 13.6ms 1.0% 2.27ms 6.88MiB 20.3% 1.15MiB
save solution 5 12.7ms 0.9% 2.54ms 6.84MiB 20.2% 1.37MiB
~I/O~ 6 899μs 0.1% 150μs 34.1KiB 0.1% 5.69KiB
get element variables 5 2.00μs 0.0% 400ns 0.00B 0.0% 0.00B
save mesh 5 1.28μs 0.0% 256ns 0.00B 0.0% 0.00B
get node variables 5 220ns 0.0% 44.0ns 0.00B 0.0% 0.00B
──────────────────────────────────────────────────────────────────────────────────── |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice work 😊
…uations from ideal_glm_mhd_multiion_2d.jl into ideal_glm_mhd_multiion.jl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small things I only noticed now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also add some unit tests for type stability in https://github.com/trixi-framework/Trixi.jl/blob/main/test/test_type.jl
Co-authored-by: Hendrik Ranocha <[email protected]> Co-authored-by: Michael Schlottke-Lakemper <[email protected]>
Co-authored-by: Hendrik Ranocha <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two small suggestions - otherwise LGTM and can be merged once also Hendrik approves
Co-authored-by: Michael Schlottke-Lakemper <[email protected]>
…st_wave compatible with single precision
Many thanks for the speedy reviews @sloede, @ranocha, @DanielDoehring !! 🙂 I have added unit tests for type stability in 79b0e29. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor code cleanup opportunity I noted just now.
@sloede there were some (admittedly minor) unresolved conversations (three comments from me and one comment from Hendrik). |
This PR introduces a minimal implementation of the 2D multi-ion GLM-MHD equations, designed to work with the TreeMesh solver. It includes a subset of the code from the larger PR that implements the multi-ion GLM-MHD equations (#1427).